package br.com.wai2008.controller;

import java.io.IOException;

import br.com.wai2008.socket.server.SocketServer;

public class ServerSocketController {
	
	public String startServer() {
		System.out.println("[ServerSocketController] Starting server...");
		SocketServer.startServer();
		System.out.println("[ServerSocketController] Server Started!");
		return "";
	}
	
	public String stopServer() {
		System.out.println("[ServerSocketController] Stopping server...");
		try {
			SocketServer.stopServer();
			System.out.println("[ServerSocketController] Server Stopped!");
		} catch (IOException e) {
			e.printStackTrace();
		}
		return "";
	}
	
	public String getServerState() {
		return SocketServer.getSocketServerStateName();
	}
	
}
